﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SuiYuan.UI.Controls.NaviMenu
{
    public partial class LayUIMenu
    {
        public string IconText { get; set; }

        public string IconValue
        {
            get
            {
                string outStr = "";
                if (!string.IsNullOrEmpty(IconText))
                {
                    string[] strlist = IconText.Replace("&#", "").Replace(";", "").Split('x');
                    try
                    {
                        for (int i = 1; i < strlist.Length; i++)
                        {
                            outStr += (char)int.Parse(strlist[i], System.Globalization.NumberStyles.HexNumber);
                        }
                    }
                    catch (FormatException ex)
                    {
                        outStr = ex.Message;
                    }
                }
                return outStr;
            }
        }

        public string Text { get; set; }
        public List<LayUIMenu> SubMenuList { get; set; }
    }
}
